body {
  margin: 0px;
}

.p01 {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  right: 1rem;
  bottom: 10vh;
}

.p02 {
  /* 
  绝对定位一定不要单独使用，除非你的定位就是相对于整个页面
  */
  position: absolute;
  right: 1rem;
  top: 1rem;
}

.p03 {
  width: 16rem;
  height: 9rem;
  border: 1px solid #ff0000;
  margin: 1rem;
  /* relative定位表示它里面的绝对定义是相对于它的坐标 */
  position: relative;
}

.x {
  position: absolute;
  top: 0px;
  right: 0px;
  transform: translate(50%, -50%);
}

.p04 {
  width: 32rem;
  height: 32rem;
  border: 1px solid #ff0000;
  position: relative;
}

.p04 > div:nth-of-type(1) {
  width: 16rem;
  height: 16rem;
  background-color: #e1c14a;
  top: 1rem;
  left: 1rem;
  position: absolute;
}

.p04 > div:nth-of-type(1):hover,
.p04 > div:nth-of-type(2):hover,
.p04 > div:nth-of-type(3):hover {
  /* 层级，值越大显示就越靠前 */
  z-index: 10;
}

.p04 > div:nth-of-type(2) {
  width: 16rem;
  height: 16rem;
  background-color: #6d4ae1;
  top: 5rem;
  left: 3rem;
  position: absolute;
}

.p04 > div:nth-of-type(3) {
  width: 16rem;
  height: 16rem;
  background-color: #d42d49;
  top: 9rem;
  left: 7rem;
  position: absolute;
}
